package com.example.userprovider.service;
import com.alibaba.dubbo.config.annotation.Service;
import com.example.userapi.model.TRsult;
import com.example.userapi.model.User;
import com.example.userapi.service.UserServerInterface;

/**
 * Created by IntelliJ IDEA2021.3
 * @Author: Tenghw
 * @Date: 2022/11/01  16:39
 * @Description:
 */
//用户相关接口实现类
@Service(version = "1.0",group = "tenghw") //属于Dubbo的@Service注解，非Spring  作用：暴露服务
public class UserServerImpl implements UserServerInterface {

    @Override
    public TRsult getUserInfo(String name, String passwd) {
        TRsult<User> result = new TRsult<>();
        User user = new User();
        user.setId(9527);
        user.setUsername(name);
        user.setPassword(passwd);
        result.setModel(user);
        return result;
    }
}
